/*
 * Copyright 2008 - 2009 Lars Heuer (heuer[at]semagia.com). All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.semagia.atomico.server.dm.impl;

import com.semagia.atomico.server.dm.ICollectionInfo;

/**
 * {@link ICollectionInfo} implementation.
 * 
 * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a>
 * @version $Rev: 132 $ - $Date: 2012-07-20 16:55:23 +0000 (Fri, 20 Jul 2012) $
 */
public final class CollectionInfo extends AbstractEntity 
    implements ICollectionInfo {

    private final String _collId;

    /**
     * Creates an instance.
     *
     * @param id The entity identifier, an IRI.
     * @param title The title of this collection.
     * @param updated The time when the collection was modified.
     * @param collId The collection identifier.
     */
    public CollectionInfo(String id, String title, long updated, String collId) {
        super(id, title, updated);
        if (collId == null) {
            throw new IllegalArgumentException("The collection id must not be null");
        }
        _collId = collId;
    }

    /* (non-Javadoc)
     * @see com.semagia.atomico.server.dm.ICollectionInfo#getCollectionId()
     */
    @Override
    public String getCollectionId() {
        return _collId;
    }

}
